package com.moter.demo01.io.in_outputstream.filterstream.datastream;

import java.io.*;

public class DataOutputStreamDemo {
    public static void main(String[] args) throws IOException {
        File file = new File("src\\main\\java\\com\\moter\\demo01\\io\\in_outputstream\\filterstream\\datastream\\data.txt");
        DataOutputStream dataOutputStream = new DataOutputStream(new FileOutputStream(file));
        String name = "moter";
        char spilt = '\t';
        Integer age = new Integer(21);
        Boolean sex = true;
        dataOutputStream.writeChars(name);
        dataOutputStream.writeChar(spilt);
        dataOutputStream.writeInt(age);
        dataOutputStream.writeChar(spilt);
        dataOutputStream.writeBoolean(sex);
        dataOutputStream.flush();
        dataOutputStream.close();

    }
}
